package org.helgoboss.one_filer_commandlet

import org.helgoboss.osgi_additions._
import org.helgoboss.commandlet.Commandlet
import org.helgoboss.one_filer.OneFiler
import org.helgoboss.maven.Maven
import org.helgoboss.obr_facade.ObrFacade
import org.helgoboss.commandlet_manager.CommandletManager
import org.helgoboss.ide.Ide


class Activator extends OsgiContext with OsgiServiceWatcher with OsgiProvider with OsgiConsumer {
    whenBundleActive {
        whenServicePresent[OneFiler] { oneFiler =>
            new OneFilerCommandlet(
                oneFiler,
                optionalService[Maven], 
                optionalService[ObrFacade], 
                optionalService[CommandletManager],
                optionalService[Ide]
            ).providesService[Commandlet]
        }
    }
}